import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'


import Login from '@/components/Login'
import Home from '@/components/Home'
import DemoTable from '@/components/Demo/Table'
import DemoTable2 from '@/components/Demo/Table2'
import DemoEdit from '@/components/Demo/Edit'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home,
      children: [{
          path: "/Demo/Table",
          name: "/DemoTable",
          component: DemoTable,
          meta: {
            title: "表格示例",
            homeActiveIndex: 0,
            showBack: false,
            keepAlive: true
          }
        },
        {
          path: "/Demo/Table2",
          name: "/DemoTable2",
          component: DemoTable2,
          meta: {
            title: "表格示例",
            homeActiveIndex: 0,
            showBack: false,
            keepAlive: true
          }
        },
        {
          path: "/Demo/Edit",
          name: "/DemoEdit",
          component: DemoEdit,
          meta: {
            title: "编辑示例",
            homeActiveIndex: 0,
            showBack: false,
            keepAlive: true
          }
        }
      ]
    }
  ]
})
